package com.xlhj.rabbit.config;

import org.springframework.context.annotation.Configuration;

/**
 * @Author: caijliu
 * @Date: 01/09/2021 14:38
 * @Description TODO
 * @Vsersion: 0.0.1
 */
@Configuration
public class ConfirmConfig {

    static final String CONFIRM_EXCHANGE_NAME = "confirm.exchange";
    static final String CONFIRM_QUEUE_NAME = "confirm.queue";
    static final String ROUTING_KEY = "confirmKey";

    /**
     * 声明业务Exchange
     * @return
     */
    /*@Bean(name = "confirmExchange")
    public DirectExchange confirmExchange() {
        return new DirectExchange(CONFIRM_EXCHANGE_NAME);
    }*/

    /**
     * 声明确认队列
     * @return
     */
    /*@Bean(name = "confirmQueue")
    public Queue confirmQueue() {
        return QueueBuilder.durable(CONFIRM_QUEUE_NAME).build();
    }*/

    /**
     * 声明确认队列绑定关系
     * @param queue
     * @param exchange
     * @return
     */
    /*@Bean
    public Binding queueBinding(@Qualifier("confirmQueue") Queue queue, @Qualifier("confirmExchange") DirectExchange exchange) {
        return BindingBuilder.bind(queue).to(exchange).with(ROUTING_KEY);
    }*/
}
